<template>
  <div class="content">
    <van-nav-bar title="标题"  left-text="返回" left-arrow  @click-left="callback"/>
    <van-panel title="张三 13811112222" desc="地址：XXXXXXXX" status="默认"><div></div></van-panel>
    <div class="order-amount">订单金额：{{totalPrice}}</div>
    <van-button type="danger" size="large" class="pay">支付</van-button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      totalPrice: {},
      username: {name:'张三', addr: 'XXXXXXXXXXX'}
    }
  },
  mounted () {
    // 获取页面传参totalPrice
    // this.totalPrice = this.$route.params.totalPrice (params接收)
    // this.totalPrice = this.$route.query.totalPrice (query)
    this.totalPrice = this.$route.params.totalPrice
  },
  methods:{
    callback () {
      window.history.go(-1);
    }
  }
}
</script>

<style scoped>
.content{
    position: relative;
    height: 100%;
}
.order-amount{
    width: 100%;
    line-height: 10em;
    text-align: center;
    color: red;
}
.pay{
    position: fixed;
    bottom: 0;
}
</style>